![]() |
PBExchangeObjectsAsync |
||||
Header: | Files.h | Carbon status: | Supported | |
Swaps the contents of two files.
void PBExchangeObjectsAsync ( FSRefParam *paramBlock );
A pointer to a parameter block.
The relevant fields of the parameter blockare:
On input, a pointer to a completion routine.
On output, the result code of the function.
On input, the first file.
On input, the second file.
The PBExchangeObjectsAsync function allows programs to implement a “safe save” operation by creating and writing a complete new file and swapping the contents. An alias, FSSpec or FSRef that refers to the old file will now access the new data.
The corresponding information in in-memory data structures are also exchanged. Either or both files may have open access paths. After the exchange, the access path will refer to the opposite file’s data (that is, to the same data it originally referred, which is now part of the other file).
Supported in Carbon. Available in Mac OS 9, and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)